// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueRouter from 'vue-router'
import VueI18n from 'vue-i18n'
import App from './App'
import router from './router'
import VueResource from 'vue-resource'
import { Swiper } from 'vux'
let common = require("../wechat/static/common/common.js");
require("./components/common/common.css");

Vue.use(require('vue-wechat-title'))
Vue.use(VueResource)
Vue.component('swiper', Swiper)
Vue.use(VueI18n)
Vue.config.productionTip = false

common.setCookie("LANG", 'zh')

const i18n = new VueI18n({
    locale: common.getCookie("LANG", 'zh'),    // 语言标识
    //this.$i18n.locale // 通过切换locale的值来实现语言切换
    messages: {
        'zh': require('../wechat/static/common/lang/zh.js'),   // 中文语言包
        'en': require('../wechat/static/common/lang/en.js')    // 英文语言包
    }
})

console.log(i18n)

/* eslint-disable no-new */
new Vue({
  i18n,
  router,
  render: h => h(App)
}).$mount('#app-box')



